package com.inibb.app.util;

import java.util.Calendar;

public class Sys{

	private Sys() {
	}

	public static Sys getInstance() {
		return new Sys();
	}
	
	public static java.util.Date getServerDate() {
		return Calendar.getInstance().getTime();
	}

	public static java.util.Date getDate() {
		return getServerDate();
	}

	public static java.sql.Timestamp getTimestamp() {
		return new java.sql.Timestamp(getDate().getTime());
	}

	public static boolean isUnix() {
		return System.getProperty("file.separator", "").equals("/");
	}

	public static String getSysServerPath() {
		String userDir = System.getProperty("user.dir");
		
		return userDir;
	}
	
	public static String getUploadPath() {
		String uploadPath = getSysServerPath()+"/../wwwroot/upload/";
		
		return uploadPath;
	}

}